package com.sakiko.pojo;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Past;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

@Data
public class User {

    @NotBlank(message = "name不能为null")
    private String name;
    @Length(min = 6, max = 12)
    private String password;
    @Min(18)
    private Integer age;
    @Past
    private Date birthday;
}
